/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package com.l2jserver.gameserver.instancemanager;

import gnu.trove.map.hash.TIntIntHashMap;

import java.util.logging.Logger;

import javolution.util.FastList;

import com.l2jserver.gameserver.datatables.SkillTable;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.base.ClassLevel;
import com.l2jserver.gameserver.model.base.SubClass;
import com.l2jserver.gameserver.model.skills.L2Skill;
import com.l2jserver.gameserver.network.serverpackets.ExChangeToAwakenedClass;
import com.l2jserver.gameserver.network.serverpackets.ExRotation;
import com.l2jserver.gameserver.network.serverpackets.ExShowUsmVideo;
import com.l2jserver.gameserver.network.serverpackets.SocialAction;

/**
 * AwakingManager
 * @author  ALF
 */
 
public class AwakingManager
{
	private static final Logger _log = Logger.getLogger(AwakingManager.class.getName());
	// ClassId => AwakingId
	private TIntIntHashMap _CA = new TIntIntHashMap();
	// l2jtw add start
	public int[] RemoveSkills = {};
	public int[] autoRemoveSkills = {1571,1572,1597,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1919,1920,1921,1922,1923,1924,1925,1926,1927,1929,1931,1933,1935,1937,1939,1954,8600,8601,8602,8603,8604,8605,8606,8607,10001,10002,10003,10004,10005,10006,10008,10009,10010,10011,10012,10013,10014,10015,10016,10017,10018,10019,10020,10021,10022,10023,10024,10025,10026,10027,10028,10030,10032,10034,10036,10038,10040,10043,10044,10251,10252,10253,10254,10255,10256,10257,10258,10260,10262,10263,10265,10266,10267,10268,10269,10270,10271,10273,10274,10275,10276,10278,10279,10280,10281,10286,10288,10289,10291,10292,10293,10294,10295,10296,10297,10298,10300,10501,10502,10503,10504,10505,10506,10507,10508,10509,10510,10511,10512,10513,10514,10516,10517,10520,10522,10524,10525,10526,10527,10528,10529,10531,10532,10535,10539,10540,10541,10542,10543,10546,10548,10549,10552,10554,10751,10752,10753,10754,10755,10756,10757,10758,10759,10760,10761,10762,10763,10769,10770,10771,10772,10774,10775,10776,10777,10778,10779,10780,10781,10783,10784,10785,10786,10787,10788,10791,10792,10793,10799,10800,10801,10802,10805,11001,11002,11003,11004,11005,11006,11007,11008,11009,11010,11011,11017,11023,11029,11030,11032,11034,11040,11046,11047,11048,11049,11050,11052,11055,11056,11057,11058,11062,11064,11065,11066,11067,11068,11093,11094,11095,11183,11184,11185,11186,11187,11251,11252,11253,11254,11255,11256,11257,11258,11259,11260,11261,11262,11263,11264,11265,11266,11267,11268,11269,11270,11271,11272,11273,11274,11276,11287,11288,11295,11296,11297,11298,11299,11302,11303,11304,11305,11306,11307,11308,11309,11310,11316,11501,11502,11503,11504,11505,11506,11507,11508,11509,11510,11511,11513,11514,11517,11518,11519,11520,11521,11522,11523,11524,11525,11529,11530,11532,11533,11534,11536,11537,11538,11539,11540,11541,11543,11544,11545,11546,11547,11548,11549,11551,11552,11553,11554,11555,11557,11558,11559,11560,11561,11562,11563,11564,11565,11566,11567,11570,11571,11751,11752,11754,11755,11756,11757,11758,11759,11760,11761,11762,11763,11764,11765,11766,11767,11768,11769,11770,11772,11773,11774,11776,11777,11778,11780,11782,11783,11784,11785,11787,11788,11789,11790,11791,11792,11814,11817,11819,11820,11821,11822,11823,11824,11825,11826,11828,11830,11831,11832};
	public int[] autoRemoveSkills_Knight = {1,2,3,4,5,6,7,8,9,11,12,13,15,16,17,19,21,24,25,27,29,30,34,35,36,42,44,45,46,48,50,51,54,56,58,60,61,69,70,72,75,76,77,78,80,81,82,83,84,87,88,91,94,95,96,98,99,100,101,103,104,106,109,111,112,113,116,118,120,121,122,123,129,130,131,134,137,139,141,142,143,144,146,148,163,164,168,169,171,172,173,176,181,190,193,195,196,198,208,209,210,211,212,213,214,216,221,222,223,225,226,227,228,229,230,233,234,235,236,244,245,249,250,251,252,254,255,256,258,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,279,280,281,282,284,285,286,287,288,289,290,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,317,319,320,321,323,324,330,331,334,336,337,338,339,340,341,342,343,344,345,346,347,348,349,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,405,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,428,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,489,490,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,529,530,531,532,533,534,535,536,537,538,620,621,622,623,624,625,626,627,628,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,784,785,786,787,788,789,790,791,792,793,794,810,811,812,813,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,840,841,842,912,913,914,915,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,933,934,935,939,945,946,947,948,949,952,964,985,986,987,988,989,990,991,992,993,994,995,997,998,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1015,1016,1018,1020,1027,1028,1031,1032,1033,1034,1035,1036,1040,1042,1043,1044,1045,1047,1048,1049,1050,1056,1059,1062,1064,1068,1069,1071,1072,1073,1074,1075,1077,1078,1083,1085,1086,1087,1090,1092,1095,1096,1097,1099,1100,1101,1102,1104,1105,1107,1108,1126,1127,1129,1139,1140,1141,1144,1145,1146,1147,1148,1151,1154,1155,1156,1157,1159,1160,1163,1164,1167,1168,1169,1170,1171,1172,1174,1175,1176,1177,1178,1181,1182,1183,1184,1189,1191,1201,1204,1206,1208,1209,1210,1213,1216,1217,1218,1219,1220,1222,1223,1224,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1271,1272,1273,1274,1275,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1303,1304,1305,1306,1307,1308,1309,1310,1311,1328,1329,1330,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1380,1381,1382,1383,1384,1385,1386,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1467,1468,1469,1470,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1525,1526,1527,1528,1529,1530,1531,1532,1533,1535,1536,1537,1538,1539,1540,1542,1543,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1598,1599,1600,20006};
	public int[] autoRemoveSkills_Warrior = {2,3,4,10,11,12,13,15,16,18,19,21,22,24,27,28,29,30,33,42,44,45,46,49,51,56,58,60,61,65,67,69,70,72,75,76,77,82,83,84,86,91,92,96,97,98,99,100,101,102,103,105,106,107,110,111,112,113,115,118,120,122,123,127,129,131,134,137,141,142,143,146,147,153,163,164,169,171,173,191,193,195,196,197,198,208,209,213,214,221,222,223,225,226,228,229,230,234,235,244,245,249,250,251,254,255,256,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,283,285,287,288,289,291,294,295,296,299,302,303,304,305,306,307,308,309,310,311,312,313,314,316,318,320,321,322,323,324,331,334,335,336,337,338,339,340,341,342,343,344,348,349,350,351,352,353,354,355,356,357,358,361,363,364,365,366,367,368,369,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,424,428,429,430,431,432,433,434,435,436,437,438,439,444,445,446,447,448,449,450,453,454,455,456,457,458,459,460,461,462,463,464,466,467,468,469,470,471,473,474,475,476,478,479,480,483,484,486,487,489,490,493,494,495,499,502,504,505,506,507,508,509,510,511,513,514,515,516,517,518,519,520,521,522,523,524,525,527,528,529,530,531,532,533,534,535,537,538,620,621,622,623,624,625,626,627,628,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,810,811,812,813,818,819,820,821,825,826,827,831,834,835,836,837,840,841,842,912,913,914,915,916,917,918,919,922,923,924,925,926,927,928,929,930,931,933,934,935,945,946,947,948,949,952,964,982,983,984,985,986,987,988,989,990,991,994,997,998,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1015,1016,1018,1020,1027,1028,1031,1032,1033,1034,1035,1036,1040,1042,1043,1044,1045,1047,1048,1049,1050,1056,1059,1062,1064,1068,1069,1071,1072,1073,1074,1075,1077,1078,1083,1085,1086,1087,1090,1092,1095,1096,1097,1099,1100,1101,1102,1104,1105,1107,1108,1126,1127,1129,1139,1140,1141,1144,1145,1146,1147,1148,1151,1154,1155,1156,1157,1159,1160,1163,1164,1167,1168,1169,1170,1171,1172,1174,1175,1176,1177,1178,1181,1182,1183,1184,1189,1191,1201,1204,1206,1208,1209,1210,1213,1216,1217,1218,1219,1220,1222,1223,1224,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1271,1272,1273,1274,1275,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1303,1304,1305,1306,1307,1308,1309,1310,1311,1328,1329,1330,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1380,1381,1382,1383,1384,1385,1386,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1467,1468,1469,1470,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1511,1512,1513,1515,1516,1517,1518,1519,1520,1521,1522,1523,1525,1526,1527,1528,1529,1530,1531,1532,1533,1535,1536,1537,1538,1539,1540,1542,1543,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1562,1563,1564,1565,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1598,1599,1600};
	public int[] autoRemoveSkills_Rogue = {1,3,5,6,7,8,9,10,13,16,17,18,19,22,24,25,27,28,29,33,35,42,44,45,46,48,49,50,54,56,58,65,67,69,72,75,76,77,78,80,81,82,83,84,86,87,88,91,92,94,95,97,98,99,100,101,103,104,107,109,110,112,113,116,118,120,121,123,127,130,131,134,139,141,142,143,144,146,147,153,163,164,172,176,181,191,196,197,208,210,213,214,222,226,228,229,234,235,244,245,249,250,251,254,255,256,261,262,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,322,323,324,331,335,336,337,338,339,340,341,342,343,345,346,348,349,350,351,352,353,354,355,356,357,359,360,361,363,364,365,366,367,368,369,400,401,402,403,404,405,406,407,408,412,413,414,415,416,417,418,419,420,421,423,424,425,428,429,430,431,433,434,435,436,437,438,439,440,441,442,443,444,445,448,449,450,451,452,454,455,456,457,458,459,460,461,462,463,464,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,489,490,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,532,533,534,535,536,537,538,620,621,622,623,624,625,626,627,628,755,756,757,758,759,760,761,762,763,764,765,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,810,811,812,813,818,819,820,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,840,841,842,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,929,930,931,933,934,935,939,945,946,947,948,949,964,982,983,984,985,986,987,988,989,990,992,993,994,995,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1015,1016,1018,1020,1027,1028,1031,1032,1033,1034,1035,1036,1040,1042,1043,1044,1045,1047,1048,1049,1050,1056,1059,1062,1064,1068,1069,1071,1072,1073,1074,1075,1077,1078,1083,1085,1086,1087,1090,1092,1095,1096,1097,1099,1100,1101,1102,1104,1105,1107,1108,1126,1127,1129,1139,1140,1141,1144,1145,1146,1147,1148,1151,1154,1155,1156,1157,1159,1160,1163,1164,1167,1168,1169,1170,1171,1172,1174,1175,1176,1177,1178,1181,1182,1183,1184,1189,1191,1201,1204,1206,1208,1209,1210,1213,1216,1217,1218,1219,1220,1222,1223,1224,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1271,1272,1273,1274,1275,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1303,1304,1305,1306,1307,1308,1309,1310,1311,1328,1329,1330,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1380,1381,1382,1383,1384,1385,1386,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1467,1468,1469,1470,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1525,1526,1527,1528,1529,1530,1531,1532,1533,1535,1536,1537,1538,1539,1540,1542,1543,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1560,1561,1562,1563,1564,1565,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1598,1599,1600,20006};
	public int[] autoRemoveSkills_Archer = {1,3,4,5,6,7,8,9,10,11,12,13,16,17,18,22,25,27,28,29,30,33,34,35,36,42,44,45,46,48,49,50,51,54,56,58,60,65,67,69,70,72,75,76,77,78,80,81,82,83,84,86,87,88,91,92,94,95,96,97,98,100,102,103,104,106,107,109,110,111,112,116,118,120,121,123,127,130,134,137,139,141,142,143,144,146,147,153,163,164,168,172,176,181,190,191,193,195,196,197,198,205,209,210,211,212,213,214,216,217,221,222,225,226,228,229,230,231,232,234,235,244,245,249,250,251,253,254,255,256,257,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,304,305,306,307,308,309,310,311,314,315,316,317,318,319,320,321,322,323,324,331,335,336,337,338,339,340,341,342,344,345,346,347,348,349,350,351,352,353,355,356,357,358,359,360,361,362,363,364,365,366,367,368,400,401,402,403,404,405,406,407,408,409,410,411,412,416,417,419,420,421,422,423,424,425,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,467,468,469,470,471,472,473,474,475,476,477,478,479,480,482,483,484,485,487,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,510,513,514,515,517,519,520,526,527,528,529,530,531,532,533,534,535,536,537,538,620,621,623,624,625,628,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,810,811,812,813,818,819,820,821,822,823,824,825,826,827,828,829,830,831,833,834,836,837,840,841,842,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,930,931,934,935,945,946,947,948,949,952,964,982,983,984,985,986,988,989,991,992,993,994,995,997,998,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1015,1016,1018,1020,1027,1028,1031,1032,1033,1034,1035,1036,1040,1042,1043,1044,1045,1047,1048,1049,1050,1056,1059,1062,1064,1068,1069,1071,1072,1073,1074,1075,1077,1078,1083,1085,1086,1087,1090,1092,1095,1096,1097,1099,1100,1101,1102,1104,1105,1107,1108,1126,1127,1129,1139,1140,1141,1144,1145,1146,1147,1148,1151,1154,1155,1156,1157,1159,1160,1163,1164,1167,1168,1169,1170,1171,1172,1174,1175,1176,1177,1178,1181,1182,1183,1184,1189,1191,1201,1204,1206,1208,1209,1210,1213,1216,1217,1218,1219,1220,1222,1223,1224,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1271,1272,1273,1274,1275,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1303,1304,1305,1306,1307,1308,1309,1310,1311,1328,1329,1330,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1380,1381,1382,1383,1384,1385,1386,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1467,1468,1469,1470,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1525,1526,1527,1528,1529,1530,1531,1532,1533,1535,1536,1537,1538,1539,1540,1542,1543,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1598,1599,1600,20006};
	public int[] autoRemoveSkills_Wizard = {1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,21,22,24,25,27,28,29,30,33,34,35,36,42,44,45,46,48,49,50,51,54,56,58,60,61,65,67,69,70,72,75,76,77,78,80,81,82,83,84,86,87,88,91,92,94,95,96,97,98,99,100,101,102,103,104,105,106,107,109,110,111,112,113,115,116,118,120,121,122,123,127,129,130,131,134,137,139,142,143,144,147,148,153,163,168,169,171,172,173,176,181,190,191,193,195,196,197,198,205,208,209,210,211,214,216,217,221,222,223,225,226,230,231,232,244,245,253,254,255,256,257,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,330,334,335,336,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,428,429,430,431,432,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,464,467,468,469,470,471,472,473,475,476,477,478,479,480,482,483,484,485,486,487,489,490,493,494,495,496,497,498,499,500,501,503,504,505,506,507,508,509,510,511,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,620,621,622,623,624,625,627,628,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,810,811,812,813,818,819,820,821,822,823,824,825,826,827,828,829,830,831,833,834,835,836,840,841,842,912,913,914,915,916,917,918,919,920,921,922,923,924,927,928,929,930,931,933,939,945,946,947,948,949,952,964,982,983,984,985,986,987,988,989,990,991,992,993,994,995,997,998,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1015,1016,1018,1020,1027,1028,1031,1032,1033,1034,1035,1036,1040,1042,1043,1044,1045,1048,1049,1050,1059,1062,1068,1071,1073,1074,1075,1077,1083,1085,1086,1087,1090,1092,1095,1096,1097,1099,1100,1101,1102,1104,1105,1107,1108,1126,1127,1129,1139,1140,1141,1144,1145,1146,1147,1154,1170,1172,1175,1177,1178,1181,1182,1184,1189,1191,1201,1204,1206,1208,1209,1210,1213,1216,1217,1218,1219,1220,1223,1224,1229,1240,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1264,1266,1268,1271,1272,1273,1274,1279,1280,1281,1282,1283,1284,1285,1286,1287,1299,1300,1301,1303,1304,1305,1306,1307,1308,1309,1310,1311,1328,1329,1330,1334,1335,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1380,1383,1384,1385,1386,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1409,1410,1411,1412,1413,1414,1415,1416,1418,1424,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1441,1443,1444,1445,1459,1460,1461,1462,1467,1468,1470,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1525,1526,1528,1529,1531,1532,1533,1535,1536,1537,1538,1539,1540,1542,1543,1547,1548,1549,1550,1551,1552,1553,1557,1558,1559,1560,1561,1562,1563,1564,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1598,1599,1600,20006};
	public int[] autoRemoveSkills_Enchanter = {1,3,4,5,6,7,8,9,10,11,12,13,16,17,18,19,22,24,25,27,28,29,30,33,34,35,36,42,44,45,46,48,49,50,51,54,56,60,65,67,69,72,75,76,77,78,80,81,82,83,86,87,88,91,92,94,95,96,97,99,100,101,103,104,106,107,109,110,111,112,113,116,118,120,121,127,130,131,134,137,139,142,143,148,153,163,168,169,171,172,173,176,181,190,193,195,197,198,208,209,210,214,216,221,222,225,226,244,245,254,255,256,261,262,263,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,312,313,314,315,316,317,318,319,320,321,322,323,324,330,334,335,338,339,340,341,342,343,344,345,346,347,348,350,351,352,353,354,355,356,357,358,359,360,361,362,368,369,400,401,403,404,405,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,429,430,431,432,433,434,435,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,456,457,458,459,460,461,462,464,467,468,469,470,471,472,473,475,476,477,478,479,480,482,483,484,485,486,487,489,490,493,494,495,496,497,498,499,500,501,502,503,506,507,508,509,510,511,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,531,532,533,534,535,536,537,538,620,621,622,623,624,625,627,628,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,810,811,812,813,818,819,820,821,822,823,824,825,826,827,828,829,830,831,833,834,835,836,840,841,842,912,913,914,915,916,917,918,919,920,921,922,923,924,928,929,930,931,933,945,946,947,948,949,952,964,982,983,984,985,987,990,991,992,993,994,995,997,998,1003,1004,1005,1008,1010,1011,1012,1013,1015,1016,1018,1020,1027,1028,1031,1034,1042,1043,1047,1049,1056,1059,1064,1069,1071,1072,1074,1075,1083,1087,1090,1100,1101,1107,1108,1126,1127,1129,1139,1140,1141,1144,1145,1146,1147,1148,1151,1154,1155,1156,1157,1159,1160,1163,1164,1167,1168,1169,1170,1171,1172,1174,1175,1176,1177,1178,1181,1183,1184,1204,1206,1210,1213,1216,1217,1218,1219,1220,1222,1223,1224,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1249,1250,1254,1255,1256,1257,1258,1259,1260,1262,1263,1264,1265,1266,1267,1268,1269,1271,1273,1274,1275,1279,1280,1281,1282,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1303,1304,1307,1311,1328,1329,1330,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1353,1354,1355,1357,1360,1361,1364,1365,1367,1380,1381,1382,1383,1384,1385,1386,1394,1396,1397,1398,1399,1400,1401,1402,1403,1409,1410,1414,1417,1418,1419,1420,1421,1422,1423,1424,1426,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1467,1468,1469,1470,1474,1475,1478,1479,1480,1482,1483,1486,1487,1492,1493,1494,1495,1496,1497,1498,1499,1500,1502,1503,1504,1505,1506,1507,1508,1510,1511,1512,1513,1514,1515,1516,1520,1521,1522,1523,1525,1526,1528,1529,1530,1531,1532,1533,1536,1537,1538,1539,1540,1542,1543,1547,1550,1551,1552,1554,1555,1556,1557,1558,1559,1560,1561,1563,1565,1598,1599,1600,20006};
	public int[] autoRemoveSkills_Summoner = {1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,21,22,24,25,27,28,29,30,33,34,35,36,42,44,45,46,48,49,50,51,54,56,58,60,61,65,67,69,70,72,75,76,77,78,80,81,82,83,84,86,87,88,91,92,94,95,96,97,98,99,100,101,102,103,104,105,106,107,109,110,111,112,113,115,116,118,120,121,122,123,127,129,130,131,134,137,139,142,144,147,148,153,163,168,169,171,172,173,176,181,190,191,193,195,196,197,198,205,208,209,210,211,214,216,217,221,222,223,225,226,227,230,231,232,233,236,244,245,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,330,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,489,490,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,620,621,622,623,624,625,626,627,628,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,784,785,786,787,788,789,790,791,792,793,794,810,811,812,813,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,840,841,842,912,913,914,915,916,917,918,919,920,921,922,923,924,927,928,929,930,931,933,939,945,946,947,948,949,952,964,982,983,984,985,986,987,988,989,990,991,992,993,994,995,997,998,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1015,1016,1018,1020,1027,1028,1031,1032,1033,1034,1035,1036,1040,1042,1043,1044,1045,1047,1048,1049,1050,1056,1059,1062,1064,1068,1069,1071,1072,1073,1074,1075,1077,1078,1083,1085,1086,1087,1090,1092,1095,1096,1097,1099,1100,1101,1102,1104,1105,1107,1108,1129,1147,1151,1154,1155,1156,1157,1159,1160,1163,1164,1167,1169,1170,1171,1172,1174,1175,1176,1177,1178,1181,1182,1183,1184,1189,1191,1201,1204,1208,1209,1210,1213,1216,1217,1218,1219,1220,1222,1223,1224,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1263,1264,1265,1266,1267,1268,1269,1271,1272,1273,1274,1275,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1300,1303,1304,1305,1306,1307,1308,1309,1310,1311,1328,1329,1330,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1380,1381,1382,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1467,1468,1469,1470,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1525,1526,1527,1528,1529,1531,1532,1533,1535,1536,1537,1538,1539,1540,1542,1543,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556,1559,1560,1561,1562,1563,1564,1565,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1598,1599,1600,20006};
	public int[] autoRemoveSkills_Healer = {1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,21,22,24,25,27,28,29,30,33,34,35,36,42,44,45,46,48,49,50,51,54,56,58,60,61,65,67,69,70,72,75,76,77,78,80,81,82,83,84,86,87,88,91,92,94,95,96,97,98,99,100,101,102,103,104,105,106,107,109,110,111,112,113,115,116,118,120,121,122,123,127,129,130,131,134,137,139,142,143,144,147,148,153,163,168,169,171,172,173,176,181,190,191,193,195,196,197,198,205,208,209,210,211,214,216,217,221,222,223,225,226,230,231,232,244,245,253,254,255,256,257,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,330,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,428,429,430,431,432,433,434,435,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,464,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,489,490,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,620,621,622,623,624,625,626,627,628,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,810,811,812,813,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,840,841,842,912,913,914,915,916,917,918,919,920,921,922,923,924,927,928,929,930,931,933,939,945,946,947,948,949,952,964,982,983,984,985,986,987,988,989,990,991,992,993,994,995,997,998,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1015,1018,1020,1027,1031,1032,1036,1042,1043,1044,1045,1047,1048,1049,1056,1062,1064,1071,1072,1074,1078,1083,1085,1086,1090,1092,1095,1096,1097,1099,1100,1101,1102,1104,1105,1107,1108,1126,1127,1129,1139,1140,1141,1144,1145,1146,1147,1148,1151,1154,1155,1156,1157,1159,1160,1163,1164,1167,1168,1169,1170,1171,1172,1174,1175,1176,1177,1178,1181,1182,1183,1184,1191,1204,1208,1209,1210,1213,1216,1220,1222,1223,1224,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1256,1257,1258,1260,1261,1262,1263,1264,1265,1266,1267,1269,1272,1274,1275,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1304,1305,1306,1307,1308,1309,1310,1328,1329,1330,1334,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1356,1362,1363,1364,1365,1366,1367,1380,1381,1382,1383,1384,1385,1386,1388,1389,1390,1391,1398,1399,1400,1403,1411,1412,1413,1414,1415,1416,1417,1419,1420,1421,1422,1423,1424,1426,1427,1429,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1451,1452,1453,1454,1455,1456,1457,1458,1460,1461,1462,1467,1468,1469,1470,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1526,1527,1529,1530,1532,1533,1535,1536,1537,1538,1539,1540,1542,1543,1547,1548,1549,1551,1552,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1598,1599,1600,20006};
	public int[] RemoveSkills_Summoner = {1111,1128,1225,1226,1227,1228,1276,1277,1278,1331,1332,1333,1406,1407,1408};
	public int[] RemoveSkills_Healer = {1425};
	public int[] RemoveSkills_Dwarf = {150,1321};
	public int[] RemoveSkills_Kamael = {1473};
	// l2jtw add end
	
	public static final AwakingManager getInstance()
	{
		return SingletonHolder._instance;
	}
	
	private AwakingManager()
	{
		// l2jtw add start
		load();
		// l2jtw add end
	}
	
	public void load()
	{
		_log.info(getClass().getSimpleName()+": Initializing");
		_CA.clear();
		
		
		/***************************************************************************************************
		* 139 H_PhoenixKnight, H_HellKnight, E_EvaTemplar, DE_ShillienTemplar
		* 140 H_Duelist, H_Dreadnought, O_Titan, O_GrandKhauatari, D_Maestro, K_Male_Doombringer
		* 141 H_Adventurer, E_WindRider, DE_GhostHunter, D_FortuneSeeker, 
		* 142 H_Sagittarius, E_MoonlightSentinel, DE_GhostSentinel, K_Female_Trickster
		* 143 H_Archmage, H_Soultaker, E_MysticMuse, DE_StormScreamer, K_Male_Soulhound, K_Female_Soulhound
		* 144 H_Hierophant, E_SwordMuse, DE_SpectralDancer, O_Dominator, O_Doomcryer, K_Judicator
		* 145 H_ArcanaLord, E_ElementalMaster, DE_SpectralMaster
		* 146 H_Cardinal, E_EvaSaint, DE_ShillienSaint
		****************************************************************************************************/
		_CA.put(90, 139);	_CA.put(91, 139);	_CA.put(99, 139);	_CA.put(106, 139);
		_CA.put(88, 140);	_CA.put(89, 140);	_CA.put(113, 140);	_CA.put(114, 140);	_CA.put(118, 140);	_CA.put(131, 140);
		_CA.put(93, 141);	_CA.put(101, 141);	_CA.put(108, 141);	_CA.put(117, 141);
		_CA.put(92, 142);	_CA.put(102, 142);	_CA.put(109, 142);	_CA.put(134, 142);
		_CA.put(94, 143);	_CA.put(95, 143);	_CA.put(103, 143);	_CA.put(110, 143);	_CA.put(132, 143);	_CA.put(133, 143);
		_CA.put(98, 144);	_CA.put(100, 144);	_CA.put(107, 144);	_CA.put(115, 144);	_CA.put(116, 144);	_CA.put(136, 144);
		_CA.put(96, 145);	_CA.put(104, 145);	_CA.put(111, 145);
		_CA.put(97, 146);	_CA.put(105, 146);	_CA.put(112, 146);
		
		_log.info(getClass().getSimpleName()+": Loaded 8 Awaking class for " + _CA.size() + " normal class.");
	}
	
	public void SetAwakingId(L2PcInstance player)
	{	
		if (player.getLevel() < 85)
			return;
		if (player.getClassId().level() < 3)
			return;
		if (player.isAwaken())
			return;
		int _oldId = player.getClassId().getId();
		
		player.setClassId(_CA.get(_oldId));
		
		if (player.isSubClassActive())
			player.getSubClasses().get(player.getClassIndex()).setClassId(player.getActiveClass());
		else
			player.setBaseClass(player.getActiveClass());
		player.broadcastUserInfo();
		// l2jtw add start
		player.broadcastPacket(new SocialAction(player.getObjectId(), _CA.get(_oldId)-119));
		AwakingRemoveSkills(player);
		// l2jtw add end
	}
	// l2jtw add start
	public void AwakingRemoveSkills(L2PcInstance player)
	{
		int _classId = player.getClassId().getId();
		if (_classId == 139)
			RemoveSkills = autoRemoveSkills_Knight;
		else if (_classId == 140)
			RemoveSkills = autoRemoveSkills_Warrior;
		else if (_classId == 141)
			RemoveSkills = autoRemoveSkills_Rogue;
		else if (_classId == 142)
			RemoveSkills = autoRemoveSkills_Archer;
		else if (_classId == 143)
			RemoveSkills = autoRemoveSkills_Wizard;
		else if (_classId == 144)
			RemoveSkills = autoRemoveSkills_Enchanter;
		else if (_classId == 145)
			RemoveSkills = autoRemoveSkills_Summoner;
		else if (_classId == 146)
			RemoveSkills = autoRemoveSkills_Healer;
		else 
			RemoveSkills = autoRemoveSkills;
		for (int i : RemoveSkills)
		{
			int level = player.getSkillLevel(i);
			if (level > 0)
			{
				L2Skill skill = SkillTable.getInstance().getInfo(i, level);
				//_log.info(getClass().getSimpleName() + ":" + player.getName() + ":remove skill:" + skill.getName() + " " + skill.getId()); 
				player.removeSkill(skill);
			}
		}
		if (_classId >= 139)
		{
			if (_classId != 145)
			{
				for (int i : RemoveSkills_Summoner)
				{
					int level = player.getSkillLevel(i);
					if (level > 0)
					{
						L2Skill skill = SkillTable.getInstance().getInfo(i, level);
						player.removeSkill(skill);
					}
				}
			}
			if (_classId != 146)
			{
				for (int i : RemoveSkills_Healer)
				{
					int level = player.getSkillLevel(i);
					if (level > 0)
					{
						L2Skill skill = SkillTable.getInstance().getInfo(i, level);
						player.removeSkill(skill);
					}
				}
			}
			int _race = player.getRace().ordinal();
			if (_race != 4)
			{
				for (int i : RemoveSkills_Dwarf)
				{
					int level = player.getSkillLevel(i);
					if (level > 0)
					{
						L2Skill skill = SkillTable.getInstance().getInfo(i, level);
						player.removeSkill(skill);
					}
				}
			}
			if (_race != 5)
			{
				for (int i : RemoveSkills_Kamael)
				{
					int level = player.getSkillLevel(i);
					if (level > 0)
					{
						L2Skill skill = SkillTable.getInstance().getInfo(i, level);
						player.removeSkill(skill);
					}
				}
			}
		}
		//player.sendSkillList();
	}
	// l2jtw add end
	public void SendReqAwaking(L2PcInstance player)
	{
		if (player.getClassId().level() < 3)
			return;
		if (player.isAwaken())
			return;
		if (player.isSubClassActive() && player.getBaseTemplate().getClassId().level() < 4)
			return;
		for (SubClass sc :player.getSubClasses().values())
		{
			if (sc.getClassDefinition().isOfLevel(ClassLevel.Awaken))
				return;
		}
		int newClassId = _CA.get(player.getClassId().getId());
		if (newClassId == player.getBaseClass())
			return;
		player.sendPacket(new ExChangeToAwakenedClass(newClassId));
	}
	
	@SuppressWarnings("synthetic-access")
	private static class SingletonHolder
	{
		protected static final AwakingManager _instance = new AwakingManager();
	}
}
